{extend name="default/base" /}
{block name="title"}{:WSTConf('CONF.mallName')}-{:WSTConf('CONF.mallSlogan')}{__block__}{/block}
{block name="css"}
<link href="__STYLE__/css/self_shop.css" rel="stylesheet">
{/block}
{block name="main"}
<input type="hidden" id="shopId" value="{$data['shop']['shopId']}">
<input type="hidden" id="goodsName" value="{$goodsName}">
<input type="hidden" id="longitude" value="{$data['shop']['longitude']}" >
<input type="hidden" id="latitude" value="{$data['shop']['latitude']}" >
<input type="hidden" id="shopName" value="{$data['shop']['shopName']}">

<div class="s-banner">
	{/*  本店分类  */}
	<div class="s-cat">
		 {volist name="$data['shopcats']" id="cat1" length="6" key="k1"}
		  <div class="shop-cat1" cid="{$k1-1}" id="ct1-{$k1-1}">
		  	<div class="shop-cat1-title">
		  	<em class="em{$k1}"></em>
		  	<h3>
	  		 <a href="{:url('home/shops/cat',['shopId'=>$data['shop']['shopId'],'ct1'=>$cat1['catId']])}">{:WSTMSubstr($cat1['catName'],0,4)}</a>
	  		</h3>
	  		</div>
	  		<p class="shop-ct1-ct2">
	  			{volist name="$cat1['children']" id="v1"}
	  			<a href="{:url('home/shops/cat',['shopId'=>$data['shop']['shopId'],'ct1'=>$cat1['catId'],'ct2'=>$v1['catId']])}">{$v1['catName']}</a> 
	  			{/volist}
	  		</p>
		 </div>

	      <ul class="shop-cat2 cid{$k1-1}" cid="{$k1-1}">
	      	{volist name="$cat1['children']" id="cat2" length="20"}
	      		<li><a href="{:url('home/shops/cat',['shopId'=>$data['shop']['shopId'],'ct1'=>$cat1['catId'],'ct2'=>$cat2['catId']])}">{$cat2['catName']}</a></li>
	      	{/volist}
	      </ul>
	     {/volist}
	</div>

		{/* 横栏广告  */}
		<div class="s-wst-slide" id="s-wst-slide" style="width:100%;float:right;height:500px;overflow:hidden;">
			{if($data['shop']['shopAds'])}
			<ul class="s-wst-slide-items">
				{volist name="$data['shop']['shopAds']" id="vo"}
					<a href="{$vo.adUrl}" {if ($vo['isOpen'])}target='_blank'{/if}><li style="background: url(__RESOURCE_PATH__/{$vo.adImg}) no-repeat  scroll center center;background-size:cover" ></li></a>
				{/volist}
			</ul>
			<div class="s-wst-slide-numbox">
				<div class="s-wst-slide-controls">
				  	{volist name="$data['shop']['shopAds']" id="vo" key="k"}
					  	{if condition="$k eq 1"}
					  		 <span class="curr"> </span>
					  	{else/}
					  		 <span class=""> </span>
					  	{/if}
					{/volist}
				</div>
			</div>
			{/if}

		</div>
</div>
	
<div class="shop_rec_out">
	<div class="s-buy-new-best-hot">
		<ul class="s-rec">
				<li class="s-rec-item j-s-rec-selected" id="fl_f_0" onmouseover="gpanelOver2(this);"><a href="javascript:void(0)">店长推荐</a></li>
				<li class="s-rec-item">
					<a href="javascript:void(0)">&nbsp;/&nbsp;</a>
				</li>
				<li class="s-rec-item" id="fl_f_1" onmouseover="gpanelOver2(this);"><a href="javascript:void(0)">热卖商品</a></li>
				<div class="wst-clear"></div>
		</ul>
		{/* 店长推荐  */}
		<div class="s-rec-glistbox" id="fl_f_0_pl">
			<ul class="s-rec-goods-list">
			    {volist name="$data['rec']" id="vo" length="4" }
				<li>
				    <a href='{:Url("home/goods/detail","goodsId=".$vo["goodsId"])}' target='_blank'>
					  <img class='goodsImg' data-original="__RESOURCE_PATH__/{:WSTImg($vo['goodsImg'])}"  title="{$vo['goodsName']}"/>
					</a>
					<div class="rec_ginfo">
						<p class="s-rec-goods-desc"><a href='{:Url("home/goods/detail","goodsId=".$vo["goodsId"])}' target='_blank'>{$vo['goodsName']}</a></p>
						<div class="s-rec-goods-bottom">
						   <p class="s-rec-goods-price"><span>￥{$vo['shopPrice']}</span></p>
						   <a href="javascript:addCart({$vo['goodsId']});">加入购物车</a>
						</div>
					</div>
				</li>
				{/volist}
				<div class="wst-clear"></div>
			</ul>
		</div> 

		<div class="s-rec-glistbox" id="fl_f_1_pl" style="display:none;">
			<ul class="s-rec-goods-list">
			    {volist name="$data['hot']" id="hot" length="4"}
				<li>
				    <a href='{:Url("home/goods/detail","goodsId=".$hot["goodsId"])}' target='_blank'>
					  <img class='goodsImg' data-original="__RESOURCE_PATH__/{:WSTImg($hot['goodsImg'])}"  title="{$hot['goodsName']}"/>
					</a>
					<div class="rec_ginfo">
						<p class="s-rec-goods-desc"><a href='{:Url("home/goods/detail","goodsId=".$hot["goodsId"])}' target='_blank'>{$hot['goodsName']}</a></p>
						<div class="s-rec-goods-bottom">
						   <p class="s-rec-goods-price"><span>￥{$hot['shopPrice']}</span></p>
						   <a href="javascript:addCart({$hot['goodsId']});">加入购物车</a>
						</div>
					</div>
				</li>
				{/volist}
			</ul>
			<div class="wst-clear"></div>
		</div>
	</div>
	
</div>


{volist name="$data['shopcats']" id="cat1" key="l" length="6"}
<div class="self_container_out">
	<div class="sf_headerbox">
		{/* 店铺一级分类 */}
		<div class="sfhl f{$l}_tit_bg">
			<a class="sfh_tit" href="#">{$cat1['catName']}</a>
		</div>
		{/* 店铺二级分类 */}
		<div class="sfhr">
			{/* 楼层二级分类 */}
			{php}
				$a = count($cat1['children']);
				if($a>5)$a=5;
			{/php}
			{volist name="$cat1['children']" id="cat2" key="l2" length="5"}
			<a href="{:url('home/shops/home',['shopId'=>$data['shop']['shopId'],'ct1'=>$cat1['catId'],'ct2'=>$cat2['catId']])}" class="c18_333">{$cat2['catName']}</a>
			{if($l2<$a)}<span class="c18_333 separatory">/</span>{/if}
			{/volist}
			<span class="c18_333 separatory"> </span>
			<a href="{:url('home/shops/home',['shopId'=>$data['shop']['shopId'],'ct1'=>$cat1['catId']])}" class="c18_333">查看更多&nbsp;&nbsp;>></a>
		</div>
		<div class="wst-clear"></div>
	</div>
	{/* 自营店铺楼层广告 */}
	{wst:ads code="self-shop-f$l" id="vo" num="1" cache="86400"}
	<div class="sf_adsbox">
		<a {if ($vo['isOpen'])}target='_blank'{/if} {if ($vo['adURL']!='')}onclick="WST.recordClick({$vo['adId']})"{/if} href="{$vo.adURL}" onfocus="this.blur()">
			<img data-original="__RESOURCE_PATH__/{$vo.adFile}" class="goodsImg" />
		</a>
	</div>
	{/wst:ads}
	{/* 楼层商品列表 */}
	<div class="sf_glistbox f{$l}_g_bg">
		<ul class="sf_glist">
			{wst:shopfloorgoods shop="data['shop']['shopId']"  cat="cat1['catId']" cache="86400" num='10' id='sgf'}
			<li>
				<a target="_blank" href="{:Url('home/goods/detail','goodsId='.$sgf['goodsId'])}" title="{$sgf['goodsName']}">
					<div class="sf_img">
						<img class='goodsImg' data-original="__RESOURCE_PATH__/{:WSTImg($sgf['goodsImg'])}" alt="{$sgf['goodsName']}" title="{$sgf['goodsName']}"/>
					</div>
					<p class="sf_gname">
						{$sgf['goodsName']}
					</p>
					<p class="sf_price">
						<span class="c11">￥</span>{:sprintf('%.1f',$sgf['shopPrice'])}
					</p>
				</a>
			</li>
			{/wst:shopfloorgoods}
			<div class="wst-clear"></div>
		</ul>
	</div>
</div>
{/volist}
<div id="container" class="container" style='display:none'></div>
{include file="default/right_cart"/}
{/block}
{block name="js"}
<script type='text/javascript' src='__STYLE__/js/self_shop.js?v={$v}'></script>
<script type='text/javascript' src='__STYLE__/js/qrcode.js?v={$v}'></script>
<script type="text/javascript" src="{:WSTProtocol()}map.qq.com/api/js?v=2.exp"></script>
<script type='text/javascript'>
$(function(){
	WST.dropDownLayer(".wst-shop-code",".wst-shop-codes");
	var qr = qrcode(10, 'H');
	var shopId = $("#shopId").val();
	var url = "{:url('mobile/shops/selfShop',array('shopId'=>$data['shop']['shopId']),true,true)}";
	qr.addData(url);
	qr.make();
	$('#qrcode').html(qr.createImgTag());
	var width = $(window).width();
	$('.wst-shop-tu').css('width',width);
});
</script>
{/block}
{block name="footer"}{__block__}
{/block}